package com.qing.eduservice.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qing.eduservice.entity.dto.EduTeacherDto;
import com.qing.eduservice.entity.pojo.EduTeacher;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qing.eduservice.entity.vo.EduTeacherVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 讲师 Mapper 接口
 * </p>
 *
 * @author Yjx
 * @since 2022-09-06
 */
@Mapper
public interface EduTeacherMapper extends BaseMapper<EduTeacher> {

    /**
     * 查询所有教师
     * @return
     */
    List<EduTeacher> queryAllTeacher();

    /**
     * 根据id删除教师
     * @param id
     * @return
     */
    int deleteTeacherById(@Param("id")String id);

    /**
     * 增加教师
     * @param eduTeacher
     * @return
     */
    int createTeacher(EduTeacher eduTeacher);

    /**
     * 修改教师信息
     * @param eduTeacher
     * @return
     */
    int updateTeacherById(EduTeacher eduTeacher);

    /**
     * 分页查询教师
     * @param page
     * @return
     */
    IPage<EduTeacher> queryBookByPage(@Param("page") Page<EduTeacher> page, EduTeacherVo eduTeacherVo);

    /**
     * 根据id查询教师
     * @param id
     * @return
     */
    EduTeacherDto searchTeacherById(@Param("id") String id);


}
